Skip to content

Add lint skill and wire it into the agent skill workflow#2985

Open
Copilot wants to merge 2 commits intomainfrom
copilot/add-linting-skill-and-refactor
Open

Add lint skill and wire it into the agent skill workflow#2985
Copilot wants to merge 2 commits intomainfrom
copilot/add-linting-skill-and-refactor

Conversation

Copy link
Contributor

Copilot AI commented Feb 27, 2026

The agent skill set had no dedicated lint skill, leaving make format mentioned ad-hoc in multiple skills with no guidance on Checkstyle. This adds a first-class lint skill and replaces scattered references consistently.

New skill: .claude/skills/lint/SKILL.md

  • Documents both linting tools: ktlint (auto-fix via make format) and Checkstyle (manual fix via ./mvnw checkstyle:check)
  • Covers common violations for each, with a 3-step workflow: format → check → verify

Updated skills

  • implement — inserts lint as step 3 in the Skill Workflow (after writing code, before test); replaces bare make format in checklist and troubleshooting
  • refactor, test — replace make format checklist items with lint skill references
  • review — extends the CI gates checklist item to suggest invoking the lint skill when style violations are found

Updated AGENTS.md

  • Annotates make format as (ktlint) in the Build section
  • Adds a one-liner pointing to the lint skill for fixing formatting and verifying both style gates

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: afranken <763000+afranken@users.noreply.github.com>
Copilot AI changed the title [WIP] Add linting skill and refactor existing skills and documentation Add lint skill and wire it into the agent skill workflow Feb 27, 2026
@afranken afranken marked this pull request as ready for review February 27, 2026 11:42
@afranken afranken self-requested a review as a code owner February 27, 2026 11:42
Copilot AI review requested due to automatic review settings February 27, 2026 11:42
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a dedicated lint skill for the S3Mock agent skill workflow, consolidating scattered references to make format and providing comprehensive guidance on both ktlint and Checkstyle linting tools.

Changes:

  • Added new .claude/skills/lint/SKILL.md documenting ktlint (auto-fix) and Checkstyle (manual fix) workflows
  • Integrated lint skill as step 3 in the implement skill workflow (between coding and testing)
  • Updated implement, refactor, test, and review skills to reference the lint skill instead of bare make format commands
  • Enhanced AGENTS.md to clarify that make format is ktlint-specific and point to the lint skill

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
.claude/skills/lint/SKILL.md New skill documenting ktlint and Checkstyle linting tools, workflow, and common violations
.claude/skills/implement/SKILL.md Added lint skill as step 3 in workflow; replaced make format references with lint skill invocations
.claude/skills/refactor/SKILL.md Updated checklist to invoke lint skill instead of running make format
.claude/skills/test/SKILL.md Updated checklist to invoke lint skill instead of running make format
.claude/skills/review/SKILL.md Extended CI gates checklist to suggest lint skill when style violations found
AGENTS.md Annotated make format as ktlint-specific; added pointer to lint skill for complete linting

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- Wrong indentation (4 spaces for Kotlin)
- Unused or wildcard imports
- Missing trailing newline
- Line length (max 120 characters — see `.editorconfig`)
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reference to .editorconfig for line length is incorrect. The .editorconfig file does not contain a max_line_length setting for Kotlin files. Ktlint uses 120 characters as its default maximum line length when not explicitly configured. The documentation should state this is the ktlint default rather than referencing .editorconfig.

Suggested change
- Line length (max 120 characters — see `.editorconfig`)
- Line length (ktlint default: max 120 characters)

Copilot uses AI. Check for mistakes.
## ktlint (Kotlin)

`make format` auto-fixes most issues. Common violations:
- Wrong indentation (4 spaces for Kotlin)
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The indentation specification is incorrect. According to the .editorconfig file (line 8), the default indent_size is 2 spaces, and there's no Kotlin-specific override. Kotlin files in this project use 2 spaces for indentation, not 4. This can be verified by examining any Kotlin file in the server/src directory.

Suggested change
- Wrong indentation (4 spaces for Kotlin)
- Wrong indentation (2 spaces for Kotlin)

Copilot uses AI. Check for mistakes.
## Checkstyle (Java / XML)

Violations must be fixed manually. Common violations (config in `etc/checkstyle.xml`):
- Wrong indentation (2 spaces for Java)
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The indentation specification is incorrect. According to the .editorconfig file (line 8), the default indent_size is 2 spaces for all files including Java. There's no Java-specific override that changes this to 2 spaces - it's already 2 spaces by default. The statement about "2 spaces for Java" is technically correct but misleading since it's the same as the default for all files in the project.

Suggested change
- Wrong indentation (2 spaces for Java)
- Wrong indentation (2 spaces, per `.editorconfig`)

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants